1. Field of the Invention
The present invention relates to a job scheduler, a job scheduling method, and a job control program that cause a plurality of jobs for controlling an appliance to be executed by being called to a main loop. Particularly, the present invention relates to a job scheduler, a job scheduling method, and a job control program storage medium that provide improvement in real-time property of embedded software not equipped with a real-time operating system (hereinafter referred to as real-time OS).
2. Description of the related art
Generally, embedded software for controlling information processing devices represented by widely used printer machines, copying machines, facsimile machines, and the like is equipped with a real-time operating system, and programs are executed under the OS's supervision.
The real-time OS divides processing units (jobs) to be controlled, assigns a concept called tasks to jobs that need to be executed in parallel, and carries out executing control of the tasks by automatically determining an order for the tasks according to preset priorities.
If the processings to be executed are not complicated, the embedded software is in many cases provided with, instead of the real-time OS, a job scheduler that sequentially calls the processings during processing generally called main loop processing.
The embedded software employing this main loop structure is constituted to complete execution of the jobs called to a main loop from the job scheduler in a shortest period of time, and to return the processings to the job scheduler.
In Japanese Unexamined Patent Publication 2003-67201, there is disclosed a controller that is intended to secure the real-time property of control processing and at the same time secure the throughput of network communication processing.
The controller described in the above publication has a program including a plurality of tasks and an operating system for carrying out executing control of the tasks. The controller supervises the tasks by dividing them into a communication task group for communication with a network communication system and a control task group for carrying out monitoring control of an object of monitoring control, switches the order of execution of the plurality of tasks on a group basis, and, according to switched tasks, executes processing of information obtained from the network communication system or the object of monitoring control.
However, mounting the real-time OS necessitates the memory to have a memory area called task control block (TCB) for storing the states of the tasks, thereby posing the problem of increase in the required size of RAM.
Further, calling of the tasks by the real-time OS is hitherto unnecessary processing, which results in a waste of time. This wasted time is generally called overhead time.
No such problems occur in the case where no real-time OS is mounted. Still, since the processing of sequentially calling the jobs to the main loop is repeated, if there is a time-demanding job, such a problem may occur that if some other job is being called by the job scheduler, the calling by the job scheduler of the time-demanding job is delayed.
If the CPU is capable enough to accommodate the total execution period of time to call the tasks, problems associated with the real-time property do not occur, since each job is accorded execution authority in shortest time required. However, in the case of an incapable CPU lacking in processability, such a crucial problem occurs that the system-requiring real-time property is not met.